<?
//define url
defined('SITE_URL') || define('SITE_URL', $CONFIG['site_url']);
defined('AJAX_PROCESS_URL') || define('AJAX_PROCESS_URL', $CONFIG['site_url'].'/ajax-process.php?params=');
defined('ADMIN_URL') || define('ADMIN_URL', $CONFIG['admin_url']);
defined('SITE_UPLOAD_URL') || define('SITE_UPLOAD_URL', $CONFIG['upload_url']);
defined('SITE_JS_URL') || define('SITE_JS_URL', SITE_URL.'/js');
defined('SITE_CSS_URL') || define('SITE_CSS_URL', SITE_URL.'/styles');
defined('SITE_IMAGES_URL') || define('SITE_IMAGES_URL', SITE_URL.'/images');
//define directory
defined('SITE_BASE_DIR') || define('SITE_BASE_DIR', $CONFIG['site_dir']);
defined('SITE_MODULE_DIR') || define('SITE_MODULE_DIR', SITE_BASE_DIR.'/modules');
defined('SITE_INCLUDE_DIR') || define('SITE_INCLUDE_DIR', SITE_BASE_DIR.'/includes');
defined('SITE_LIBRARY_DIR') || define('SITE_LIBRARY_DIR', SITE_BASE_DIR.'/library');
defined('SITE_UPLOAD_DIR') || define('SITE_UPLOAD_DIR', $CONFIG['upload_dir']);

// Include functions HERE
include SITE_LIBRARY_DIR."/functions.php";
include SITE_LIBRARY_DIR."/common.php";

//database connection
include (SITE_LIBRARY_DIR."/mysql.php");//database object
$db = new database();
//$db->port = 3307;
$db-> db= array(
	"host" => $CONFIG['db_host'] , 
	"user" => $CONFIG['db_user'] , 
	"pass" => $CONFIG['db_pass'] ,
	"db" => $CONFIG['db_name']
);
$db->Debug = true;
$db->connect();
$db->query("set names utf8"); 
?>
